# -*- coding:utf-8 -*-

from interface.interface_base import app, jsonify, render_template
from interface.interface_group import save_group
from interface.interface_stockBoard import sbSave
from interface.interface_marketSentiment import msSave, allDataSave


@app.route('/get-async-routes', methods=['GET'])
def getAsyncRoutes():
    routers = [
      {
        "path": "/group",
        "name": "GroupPage",
        "meta": {
          "title": "板块",
          "icon": "ep:users",
          "rank": 10
        },
        "children": [
          {
            "path": "/group/ztsTop",
            "name": "GroupZtsTopPage",
            "meta": {
              "title": "涨停数TOP",
            }
          }
        ]
      },
      {
      "path": "/permission",
      "meta": {
        "title": "权限管理",
        "icon": "ep:lollipop",
        "rank": 10
      },
      "children": [
        {
          "path": "/permission/page/index",
          "name": "PermissionPage",
          "meta": {
            "title": "页面权限",
            "roles": ["admin", "common"]
          }
        },
        {
          "path": "/permission/button/index",
          "name": "PermissionButton",
          "meta": {
            "title": "按钮权限",
            "roles": ["admin", "common"],
            "auths": [
              "permission:btn:add",
              "permission:btn:edit",
              "permission:btn:delete"
            ]
          }
        }
      ]
    }]
    return jsonify(routers)